package org.nlp.util;

import java.io.IOException;

import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IntsRef;
import org.apache.lucene.util.fst.Builder;
import org.apache.lucene.util.fst.FST;
import org.apache.lucene.util.fst.PositiveIntOutputs;

public class Fst {
	
	
	public static void main(String[] args) {
		final PositiveIntOutputs outputs = PositiveIntOutputs.getSingleton(true);
		final Builder<Long> builder = new Builder<Long>(FST.INPUT_TYPE.BYTE1, outputs);
		
		final IntsRef a = new IntsRef();
		final IntsRef b = new IntsRef();
		final IntsRef c = new IntsRef();
		
//		builder.add(a, outputs.get(17));
		
		try {
			builder.add(a, 0L);
//			builder.add(a, 1L);
//			builder.add(c, 2L);			
			
			final FST<Long> fst = builder.finish();			
			
			System.out.println(fst.getNodeCount());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		
	
	}
}
